package jdklearn.bio.复制文件;

import org.junit.Test;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * create at 2018/11/2
 * author: suveng
 * email: suveng@163.com
 **/
public class Main {
    @Test
    public void copyfile() throws IOException {

    }

    public static void main(String[] args) throws IOException {
        FileInputStream fileInputStream=new FileInputStream("hello");
        FileOutputStream fileOutputStream=new FileOutputStream("copy_readme.md");

        byte[] bytes = new byte[5];
        while (fileInputStream.read(bytes)!=-1){
            fileOutputStream.write(bytes);
        }
        fileInputStream.close();
        fileOutputStream.close();
    }
}
